import numpy as np
import cv2
import BinocularMeas as bl
import suanfa as sl
# 读取相机内外参的txt文件
file = open('Parameters.txt', 'r')

P = (np.array([x.strip() for x in file.readlines()])).astype(np.float64)
imageSize=(1280,1024)

P0, P1, Pl, Pr, mapLx, mapLy, mapRx, mapRy = sl.getStereoRectifyImageFromCameraParameters(P, imageSize)
# 光斑的左右质心坐标
centerlistL,centerlistR,coordinate=sl.getSpotcentroidFromCamera(P)



